package com.wangshouyu.mp.micro.qrcode;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @description grb
 * @date 2020/8/21 下午10:27
 */
public class Rgb implements Serializable {

    /**
     * r
     */
    private Integer r;

    /**
     * g
     */
    private Integer g;

    /**
     * b
     */
    private Integer b;

    public Integer getR() {
        return r;
    }

    public void setR(Integer r) {
        this.r = r;
    }

    public Integer getG() {
        return g;
    }

    public void setG(Integer g) {
        this.g = g;
    }

    public Integer getB() {
        return b;
    }

    public void setB(Integer b) {
        this.b = b;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Rgb rgb = (Rgb) o;
        return Objects.equals(r, rgb.r) && Objects.equals(g, rgb.g) && Objects.equals(b, rgb.b);
    }

    @Override
    public int hashCode() {
        return Objects.hash(r, g, b);
    }

    @Override
    public String toString() {
        return "Rgb{" +
                "r=" + r +
                ", g=" + g +
                ", b=" + b +
                '}';
    }
}
